#!/bin/sh
echo 2 > /sys/class/net/enp130s0f0/device/sriov_numvfs
echo 0000:82:00.2 > /sys/bus/pci/drivers/mlx5_core/unbind
echo 0000:82:00.3 > /sys/bus/pci/drivers/mlx5_core/unbind
devlink dev eswitch set pci/0000:82:00.0 mode switchdev
echo 0000:82:00.3 > /sys/bus/pci/drivers/mlx5_core/bind
echo 0000:82:00.2 > /sys/bus/pci/drivers/mlx5_core/bind
ip link set enp130s0f0 vf 0 mac e4:11:22:33:44:50
ip link set enp130s0f0 vf 1 mac e4:11:22:33:44:51
ifconfig enp130s0f0 up
ifconfig enp130s0f0_0 up
ifconfig enp130s0f0_1 up
ethtool -K enp130s0f0 hw-tc-offload on
ethtool -K enp130s0f0_0 hw-tc-offload on
ethtool -K enp130s0f0_1 hw-tc-offload on

